/*********************************************************************\
*
*                  (c) lkc
*                  All Rights Reserved. lkc Confidential
*
\*********************************************************************/
/*********************************************************************\
*   Title                      :
*
*   Module Description         :
*
*   Author                     : lkc
*
*   Created                    : 2018-6-24
*
\*********************************************************************/
#ifndef UTILITY_TH_H
#define UTILITY_TH_H

#include <stdio.h>
#include "vector"
#include <opencv2/opencv.hpp>
#include <QtGui>

#include <vector>

//#define __DEBUG__
//#ifdef __DEBUG__
//#define KCPRINTF(format,...)  printf(format, ##__VA_ARGS__)
//#elif defined __DEBUG_INF__
//#define KCPRINTF(format,...)  printf("File: " __FILE__ ", Line: %05d: " format, __LINE__, ##__VA_ARGS__)
//#else
//#define KCPRINTF(format,...)
//#endif


void DebugPrintf(const char *cmd,...);
void MyWrite(const char* fileName,const char* modes, const char* content);
int SetNonblocking(int fd);//设置为非阻塞状态
int SetBlocking(int fd);//设置为阻塞状态
unsigned char CheckSum(const unsigned char *start, int count);
//unsigned char checkSum(const std::vector<unsigned char> &vec,int start,int end);
unsigned char CheckSum(std::deque<unsigned char>::const_iterator start,int count);

QImage MatToQImage(const cv::Mat&);

#endif // UTILITY_TH_H
/********************************************************************\
 *
 * REVISION RECORDS
 *
\*********************************************************************/
/*********************************************************************/
/*
 *
 *
 *
\*********************************************************************/
/*------------------------------The End------------------------------*/

